package com.znf4.banklink.exception;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.znf4.exception.BizException;

/**
 * 银行通道异常类
 */
public class BankLinkBizException extends BizException {
    private static final long serialVersionUID = 3536909333010163563L;

    /** 请求参数异常 **/
    public static final int REQUEST_PARAM_ERRO = 101;

    /** 通道通信异常 **/
    public static final int CHANNEL_NETWORK_ERRO = 102;

    /** 通道签名异常 **/
    public static final int CHANNEL_VERIFY_ERRO = 103;

    /** 出款金额有误 **/
    public static final BankLinkBizException SETT_AMOUNT_ERROR = new BankLinkBizException(10010008, "出款金额有误");


    private static final Log LOG = LogFactory.getLog(BankLinkBizException.class);

    public BankLinkBizException() {
    }

    public BankLinkBizException(int code, String msgFormat, Object... args) {
        super(code, msgFormat, args);
    }

    public BankLinkBizException(int code, String msg) {
        super(code, msg);
    }

    public BankLinkBizException print() {
        LOG.info("==>BizException, code:" + this.code + ", msg:" + this.msg);
        return this;
    }

}
